<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<!DOCTYPE html>
<html>
<head>
    <title>JSP - Hello World</title>
    <style>
        body {
            background: linear-gradient(135deg, #71b7e6, #9b59b6);
            height: 100vh;
            display: flex;
            justify-content: center;
            align-items: center;
            margin: 0;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        }

        .container {
            background-color: #ffffffcc;
            padding: 30px 40px;
            border-radius: 15px;
            box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
            max-width: 400px;
            width: 100%;
        }

        h1 {
            text-align: center;
            color: #333;
            margin-bottom: 25px;
        }

        form label {
            display: block;
            margin-bottom: 8px;
            color: #555;
            font-weight: 500;
        }

        form input[type="text"],
        form input[type="date"] {
            width: 100%;
            padding: 10px 12px;
            margin-bottom: 20px;
            border: 1px solid #b4b4b4;
            border-radius: 5px;
            transition: border-color 0.3s;
            font-size: 16px;
        }

        form input[type="text"]:focus,
        form input[type="date"]:focus {
            border-color: #71b7e6;
            outline: none;
        }

        .radio-group {
            display: flex;
            gap: 15px;
            margin-bottom: 20px;
            align-items: center;
        }

        .radio-group input[type="radio"] {
            margin-right: 5px;
        }

        form input[type="submit"] {
            width: 100%;
            padding: 12px;
            background-color: #71b7e6;
            border: none;
            border-radius: 5px;
            color: white;
            font-size: 18px;
            cursor: pointer;
            transition: background-color 0.3s;
        }

        form input[type="submit"]:hover {
            background-color: #5a9bd4;
        }

        @media (max-width: 500px) {
            .container {
                padding: 20px;
            }

            h1 {
                font-size: 24px;
            }
        }
    </style>
</head>
<body>
<h1>添加学生</h1>
<form action="StudentServlet" method="post">
    <!-- 姓名输入框 -->
    <label for="name">姓名：</label>
    <input type="text" id="name" name="name" required />

    <!-- 性别单选按钮 -->
    <label for="gender">性别：</label>
    <div id="gender" class="radio-group">
        <input type="radio" id="male" name="gender" value="男" checked />
        <label for="male">男</label>
        <input type="radio" id="female" name="gender" value="女" />
        <label for="female">女</label>
    </div>

    <!-- 生日日期输入框 -->
    <label for="birthday">生日：</label>
    <input type="date" id="birthday" name="birthday" required />

    <!-- 班级输入框 -->
    <label for="clazz">班级：</label>
    <input type="text" id="clazz" name="clazz" required />

    <!-- 提交按钮 -->
    <input type="submit" value="添加学生" />
</form>
<br/>
</body>

</html>